<#import "../content/page.html" as page><@page.layout "首页"  0>
 <div class="container-fluid">
	<div class="row">
		<div class="col-xs-12 col-md-12">
			<div class="panel panel-info">
				<div class="panel-heading">用户统计</div>
				<div class="panel-body">
					<div id="main" style="width: 100%;height:400px;"></div>
				</div>
			</div>
		</div>

	</div>

 </div>
 <script>
     (function () {
         // 基于准备好的dom，初始化echarts实例
         var myChart = echarts.init(document.getElementById('main'));

         var option = {
             title: {
                 text: '一周内新增用户统计',
                 subtext: '2017-01'
             },
             tooltip: {
                 trigger: 'axis'
             },
             legend: {

             },
             toolbox: {
                 show: true,
                 feature: {
                     dataZoom: {
                         yAxisIndex: 'none'
                     },
                     dataView: {readOnly: false},
                     magicType: {type: ['line', 'bar']},
                     restore: {},
                     saveAsImage: {}
                 }
             },
             xAxis:  {
                 type: 'category',
                 boundaryGap: false,
                 data: ['周一','周二','周三','周四','周五','周六','周日']
             },
             yAxis: {
                 type: 'value',
                 axisLabel: {
                     formatter: '{value}'
                 }
             },
             series: [
                 {
                     name:'新增用户',
                     type:'line',
                     data:[11, 11, 15, 13, 12, 13, 10],
                     markPoint: {
                         data: [
                             {type: 'max', name: '最大值'},
                             {type: 'min', name: '最小值'}
                         ]
                     },
                     markLine: {
                         data: [
                             {type: 'average', name: '平均值'}
                         ]
                     }
                 }

             ]
         };

         // 使用刚指定的配置项和数据显示图表。
         myChart.setOption(option);
	 })();

 </script>
</@page.layout>